package com.tjsinfo.tjsoa.fileDocument.action;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.struts.action.Action;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;

import com.tjsinfo.tjsoa.fileDocument.bo.IFileDocumentFileBo;

public class CopyFileAction extends Action{
	private IFileDocumentFileBo documentFileBo;
	public IFileDocumentFileBo getDocumentFileBo() {
		return documentFileBo;
	}
	public void setDocumentFileBo(IFileDocumentFileBo documentFileBo) {
		this.documentFileBo = documentFileBo;
	}
	public ActionForward execute(ActionMapping mapping, ActionForm form,
			HttpServletRequest request, HttpServletResponse response) {
		
		String copyid = request.getParameter("copyid");
		String copygroup = request.getParameter("copygroup");
		documentFileBo.MoveFile(copyid.substring(0, copyid.length()-1), copygroup);
		request.setAttribute("first", "shi");
		
		request.setAttribute("linkurl", "tjsinfo/tjsoa/fileDocument/intoCopyFile.do");
		request.setAttribute("message", "moveok");
		return mapping.findForward("success");
	}
}
